<template>
  <div>
    <div id="main" style="width: 600px; height: 400px"></div>
  </div>
</template>

<script>
import * as echarts from "echarts";
import axios from "@/tool/axios";
export default {
  data() {
    return {};
  },
  mounted() {
    this.get()
  },
  methods: {
    async get() {
      let res = await axios.get("reports/type/1");
      console.log(res);
      var myChart = echarts.init(document.getElementById("main"));
      myChart.setOption(res.data);
    },
  },
};
</script>

<style scoped>
</style>